package com.sumainfor.pc.market.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.service.ViolationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 功能描述:
 *
 * @Auther: zhlu
 * @Date: 2019/3/7 18:12
 * @Description:
 */
@RestController
@RequestMapping("/violation")
public class ViolationController {

    @Autowired
    ViolationService ViolationService;

    /**
     * 功能描述: 
     * 获取租客违规分类
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/3/7 18:15
     */
    @GetMapping("/getViolationList")
    public JsonResult getViolationList(){
        JsonResult result=new JsonResult();
        Map<String,Object> params=new HashMap<String,Object>();
        params.put("delfg",0);
        result.put(ViolationService.getViolationList(params));
        return result;
    }

    /**
     * 功能描述: 
     * 根据租客违规分类编号获取租客违规内容
     * @Author zhlu
     * @Description //TODO
     * @Date 2019/3/7 18:16
     */
    @GetMapping("/getViolationInfoList")
    public JsonResult getViolationInfoList(@RequestParam Map<String,Object>params){
        JsonResult result=new JsonResult();
        params.put("delfg",0);
        result.put(ViolationService.getViolationInfoList(params));
        return result;
    }

}
